/**
 * @file 文件名称
 * @brief 简要说明
 * @author 作者名称
 * @date xxxx.xx.xx
 */

#include <stdio.h>
#include <assert.h>
#include "dynobj.hpp"
#include "t1.hpp"
#include "t2.hpp"

//using namespace dynobj;

class DemoA
{
public:
    virtual void test() { printf("DemoA\n"); }
    DEF_DYNOBJ(DemoA)
};

IMP_DYNOBJ(DemoA)






int main(int argc, char *argv[])
{
    DemoA* a = (DemoA*)dynobj::create_dynobj("DemoA");
    printf("class: %s\n", a->get_runtimeclass()->name);
    a->test();

    DemoB* b = (DemoB*)dynobj::create_dynobj("DemoB");
    printf("class: %s\n", b->get_runtimeclass()->name);
    b->test();
  
    DemoC* c = (DemoC*)dynobj::create_dynobj("DemoC");
    assert(c != 0);
    c->test();
    
    return 0;
}
